package com.cdp.zwy.zwy_manager_back_v1.common;

import lombok.Data;

/**
 * @author Administrator
 * @version 1.0
 * @description: TODO
 * @date 2025/4/6 20:14
 */
@Data
public class Result {
    private String code;
    private String msg;
    private Object data;

    public Result() {
    }

    public Result(String code, String msg, Object data) {
        this.code = code;
        this.msg = msg;
        this.data = data;
    }
    public static Result success() {
        return new Result("200", "success", null);
    }
    public static Result success(Object data) {
        return new Result("200", "success", data);
    }
    public static Result error() {
        return new Result("500", "请求失败", null);
    }
    public static Result error(String code,String msg) {
        return new Result(code, msg, null);
    }


}
